{template common/header}
<div class="container">
	<div class="span9 main">
		<div class="tab-nav clearfix">
			<ul class="tabs unstyled">
				<li class="tab {if !$category_id}active{/if}">
					<a href="{url group/listing}" class="parent">
						<span class="meta">{lang all_category}</span>
					</a>
				</li>
				{loop $rootCategories $category}
				<li class="tab {if $category_id==$category['category_id']}active{/if}">
					<a href="{url group/listing?cid=$category['category_id']}" class="parent">
						<span class="meta">$category['category_name_cn']</span>
					</a> 
				</li>
				{/loop}
			</ul>
			<ul class="tabs unstyled pull-right">
				<li class="tab {if $sort=='dtime'}active{/if}">
					<a href="{url group/listing?sort=dtime&cid=$category_id}" class="parent">
						<span class="meta">{lang lastest}</span>
					</a>
				</li>
				<li class="tab {if $sort=='dmember'}active{/if}">
					<a href="{url group/listing?sort=dmember&cid=$category_id}" class="parent">
						<span class="meta">{lang hotest}</span>
					</a>
				</li>
			</ul>
		</div>
         {template waterfall/group}
         <div class="pull-right">$pages</div>
	</div>
	<div class="span3 secondary">
		<div class="span3 ml0">
			<h4>{lang about} <span class="meta">{lang group}</span></h4>
			<p class="copy">
				{lang group_tip}
			</p>
		</div>
		<div class="span3 ml0">
			<h4>{lang lastest} <span class="meta">{lang group}</span></h4>
			<ol class="lists">
				{loop $newest10 $top}
				<li>
					<a href="{url group/show?groupid=$top['group_id']}">
						<span class="topic-img">
						<img src="{echo groupbanner($top['group_id'])}" onerror="this.src=base_url+'assets/img/default_group_banner.gif';" title="{$top['group_title']}">
						</span>
						<strong>{$top['group_title']}</strong>
						<span class="list-meta">
							{$top['total_member']} {lang group_member}
						</span>
						<span class="list-meta">{lang created} {date $top['create_time']}</span>
					</a>
				</li>
				{/loop}
			</ol>
		</div>
         {template common/secondary}
	</div>
</div>
{template common/footer}